package com.zcgame.floatview

import android.content.res.Resources

/**
 *@author:huangLJ
 *@date:2021/4/27 17:02
 */
object DensityUtil {
    private val density = Resources.getSystem().getDisplayMetrics().density
    private val scaledDensity = Resources.getSystem().getDisplayMetrics().scaledDensity
    fun dip2px(value:Float) = (density * value + 0.5F).toInt()

}